package com.cq.hd.member.mapper;

import com.cq.hd.member.api.dto.AdminMemberCardBillPageDto;
import com.cq.hd.member.api.vo.AdminMemberCardBillPageVo;
import com.cq.hd.member.po.TbMemberCardBillPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 次卡下单流水表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-12-21
 */
@Mapper
public interface TbMemberCardBillMapper extends BaseMapper<TbMemberCardBillPo> {

    List<AdminMemberCardBillPageVo> listAdminMemberCardBill(AdminMemberCardBillPageDto adminMemberCardBillPageDto);

    int subRemainActiveCount(@Param("id") Long id, @Param("remainActiveCount") Integer remainActiveCount, @Param("now") LocalDateTime now);

    BigDecimal getTotalAmt(@Param("payState") Integer payState);

}
